﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace MusaDor.Account
{
    public partial class Profile : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            String NOU =  HttpContext.Current.User.Identity.Name;
            NameOfUser.Text = NOU;

            if (Roles.IsUserInRole(User.Identity.Name, "Administrator"))
            {
                RoleOfUser.Text = "Administrator";
              return;
            }
            else if (Roles.IsUserInRole(User.Identity.Name, "Publisher"))
            {
                RoleOfUser.Text = "Publisher";
                return;
            }
            else if (Roles.IsUserInRole(User.Identity.Name, "JustUser"))
            {
                RoleOfUser.Text = "User";
                return;
            }
        }
    }
}